package com.yyplatform.admin.platform.generator.model.entity;

import com.yyplatform.admin.infra.model.entity.BaseEntity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

/**
 * @author sleepforests@163.com
 * <p>
 * Created on 2024/9/21 23:04
 */
@Entity
@Getter
@Setter
@Table(name = "sys_generator_column_config")
public class GenColumnConfigEntity extends BaseEntity {

    @Column(name = "table_name", nullable = false, columnDefinition = " varchar(200) comment '表名称' ")
    private String tableName;

    @Column(name = "table_config_id", nullable = false, columnDefinition = "bigint(20) comment '表配置ID_FK' ")
    private Long tableConfigId;

    @Column(name = "column_name", columnDefinition = " varchar(200) comment '字段名称'")
    private String columnName;

    @Column(name = "column_type", columnDefinition = " varchar(200) comment '字段类型' ")
    private String columnType;

    @Column(name = "column_length", columnDefinition = " int comment '字段长度' ")
    private Integer columnLength;

    @Column(name = "field_name", columnDefinition = " varchar(200) comment '字段名称'")
    private String fieldName;

    @Column(name = "field_type", columnDefinition = " varchar(200) comment '字段类型' ")
    private String fieldType;

    @Column(name = "field_sort_num", columnDefinition = " int comment '字段排序' ")
    private Integer fieldSortNum;

    @Column(name = "field_comment", columnDefinition = " varchar(200) comment '字段描述' ")
    private String fieldComment;

    @Column(name = "max_length", columnDefinition = "int  comment '最大长度' ")
    private Integer maxLength;

    @Column(name = "is_required", columnDefinition = " tinyint comment '是否必填' ")
    private Boolean isRequired;

    @Column(name = "is_show_in_list", columnDefinition = "tinyint  comment '是否列表显示' ")
    private Boolean isShowInList;

    @Column(name = "is_show_in_form", columnDefinition = "tinyint comment '是否表单展示' ")
    private Boolean isShowInForm;

    @Column(name = "is_show_in_query", columnDefinition = " tinyint comment '是否查询参数' ")
    private Boolean isShowInQuery;

    @Column(name = "query_type", columnDefinition = "tinyint  comment '查询方式'")
    private Integer queryType;

    @Column(name = "form_type", columnDefinition = "tinyint comment '表单类型' ")
    private Integer formType;

    @Column(name = "dict_code", columnDefinition = "varchar(200) comment '字典编码' ")
    private String dictCode;


}
